library(MASS)
car.data = table(Cars93$AirBags, Cars93$Type) 
print(chisq.test(car.data))
